package com.hu.video.entity.checkAndrank;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hu.video.entity.TUser;
import com.hu.video.entity.TVideo;
import com.hu.video.entity.TVideotype;

import java.math.BigDecimal;
import java.util.Date;

public class VideoHotRank {
    private Long rankId;
    private Long videoId;
    private String rankType;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date rankDate;

    private Integer rankPosition;
    private BigDecimal hotScore;
    private Long viewCount;
    private Long likeCount;
    private Long commentCount;
    private Long shareCount;
    private Long collectCount;
    private String trend;
    private Integer previousPosition;
    private Integer positionChange;
    private BigDecimal growthRate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastUpdate;

    // 关联字段
    private TVideo video;
    private TUser user;
    private TVideotype videoType;

    public VideoHotRank() {}

    public VideoHotRank(Long videoId, String rankType, Date rankDate, Integer rankPosition,
                       BigDecimal hotScore, Long viewCount, Long likeCount, Long commentCount,
                       Long shareCount, Long collectCount) {
        this.videoId = videoId;
        this.rankType = rankType;
        this.rankDate = rankDate;
        this.rankPosition = rankPosition;
        this.hotScore = hotScore;
        this.viewCount = viewCount;
        this.likeCount = likeCount;
        this.commentCount = commentCount;
        this.shareCount = shareCount;
        this.collectCount = collectCount;
    }

    // Getters and Setters
    public Long getRankId() {
        return rankId;
    }

    public void setRankId(Long rankId) {
        this.rankId = rankId;
    }

    public Long getVideoId() {
        return videoId;
    }

    public void setVideoId(Long videoId) {
        this.videoId = videoId;
    }

    public String getRankType() {
        return rankType;
    }

    public void setRankType(String rankType) {
        this.rankType = rankType;
    }

    public Date getRankDate() {
        return rankDate;
    }

    public void setRankDate(Date rankDate) {
        this.rankDate = rankDate;
    }

    public Integer getRankPosition() {
        return rankPosition;
    }

    public void setRankPosition(Integer rankPosition) {
        this.rankPosition = rankPosition;
    }

    public BigDecimal getHotScore() {
        return hotScore;
    }

    public void setHotScore(BigDecimal hotScore) {
        this.hotScore = hotScore;
    }

    public Long getViewCount() {
        return viewCount;
    }

    public void setViewCount(Long viewCount) {
        this.viewCount = viewCount;
    }

    public Long getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Long likeCount) {
        this.likeCount = likeCount;
    }

    public Long getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Long commentCount) {
        this.commentCount = commentCount;
    }

    public Long getShareCount() {
        return shareCount;
    }

    public void setShareCount(Long shareCount) {
        this.shareCount = shareCount;
    }

    public Long getCollectCount() {
        return collectCount;
    }

    public void setCollectCount(Long collectCount) {
        this.collectCount = collectCount;
    }

    public String getTrend() {
        return trend;
    }

    public void setTrend(String trend) {
        this.trend = trend;
    }

    public Integer getPreviousPosition() {
        return previousPosition;
    }

    public void setPreviousPosition(Integer previousPosition) {
        this.previousPosition = previousPosition;
    }

    public Integer getPositionChange() {
        return positionChange;
    }

    public void setPositionChange(Integer positionChange) {
        this.positionChange = positionChange;
    }

    public BigDecimal getGrowthRate() {
        return growthRate;
    }

    public void setGrowthRate(BigDecimal growthRate) {
        this.growthRate = growthRate;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    public TVideo getVideo() {
        return video;
    }

    public void setVideo(TVideo video) {
        this.video = video;
    }

    public TUser getUser() {
        return user;
    }

    public void setUser(TUser user) {
        this.user = user;
    }

    public TVideotype getVideoType() {
        return videoType;
    }

    public void setVideoType(TVideotype videoType) {
        this.videoType = videoType;
    }

    @Override
    public String toString() {
        return "VideoHotRank{" +
                "rankId=" + rankId +
                ", videoId=" + videoId +
                ", rankType='" + rankType + '\'' +
                ", rankDate=" + rankDate +
                ", rankPosition=" + rankPosition +
                ", hotScore=" + hotScore +
                ", viewCount=" + viewCount +
                ", likeCount=" + likeCount +
                ", commentCount=" + commentCount +
                ", shareCount=" + shareCount +
                ", collectCount=" + collectCount +
                ", trend='" + trend + '\'' +
                ", previousPosition=" + previousPosition +
                ", positionChange=" + positionChange +
                ", growthRate=" + growthRate +
                ", lastUpdate=" + lastUpdate +
                '}';
    }
}